function f  = new_pr(p_cf_i,delta_i,mc_i,A1_i,x2_i,theta2,v_c,cf_salestax_i) % function computing counterfactual price equilibrium  
expmu_cf = expmu(theta2,v_c,x2_i,p_cf_i);
expdelta_cf=exp(delta_i);
s_indiv=ind_shares(expdelta_cf,expmu_cf); 
s_mkt=mean(s_indiv,2);
price1=(mc_i+markup_sim(theta2,v_c,delta_i,s_indiv,A1_i,s_mkt)).*(1+cf_salestax_i);
f=norm(p_cf_i-price1);
end